<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动布局</title>
  <style>
    ul{
      margin: 0;
      padding: 0;
      list-style: none;
        border: 5px solid black;
        /*height: 24px;*/
        overflow: hidden;
    }
    li{
      float: left;
      /*margin-right: 20px;*/
    }
    .first{
      margin: 0px 15px;
    }
    .item{
      margin: 0px 15px;
      cursor: pointer;
      padding: 0 5px;
    }
    .active,.item:hover{
      background-color: red;
      color: white;
      border-radius: 10px;
    }
    .clear{
        clear: both
    }

  </style>
</head>
<body>
<ul>
  <li class="first">难度：</li>
  <li class="item">全部</li>
  <li class="item">初级</li>
  <li class="item">中级</li>
  <li class="item">高级</li>
<!--    <p class="clear"></p>-->
</ul>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam, atque beatae consequatur doloremque error eveniet fuga hic laboriosam perspiciatis quis quod rerum totam velit. Ipsum nemo neque suscipit voluptas voluptatem.</p>
</body>
</html>